package com.edu.service.impl;

import com.edu.dao.UserDao;
import com.edu.dao.impl.UserDaoImpl;
import com.edu.entity.User;
import com.edu.service.UserService;

/**
 * @Author:czc
 * @Date: 2024/9/13 19:30
 * @Description:
 */
public class UserServiceImpl implements UserService {
    UserDao userDao= new UserDaoImpl();
    @Override
    public boolean selectUser(String username) {
        boolean x=userDao.selectUser(username);
        return x;
    }

    @Override
    public User selectUserByPass(String username, String userpass) {
        User u=userDao.selectUserByPass(username,userpass);
        return u;
    }

    @Override
    public boolean addUser(String username, String userpass, String name) {
        int num=userDao.addUser(username,userpass,name);
        if (num!=0){
            return true;
        }
        return false;
    }
}
